Nodes SelectionΒΆ
The first thing done by a RenderGaph is selecting one or more scene graph objects and modifying their attributes. Selecting nodes is done with the Tag nodes or the Path nodes on the left side of the RenderGraph.
Note that the selectors nodes are not the geometric objects themselves, but they react to the geometric objects they match. When reacting, these nodes flow through the RenderGraph.
Tag node
Tag nodes are active for objects which have one or more tag in common. For instance, the All tag node is active for all objects in the scene, because the All tag is automatically set in the scene root.
- Go in the RenderGraph node network.
- Add the Tag node using the node picker (Ctrl+Space then type 'tag').
- Select single or multiple nodes by typing your tag in the Tag text box of the Tag node Properties view and tagging scene graph nodes with your tag.
Path node
Path nodes are active for objects which hierarchy path matches the node Path pattern. For instance, the Path node set with ".*" is active all objects of the scene, because ".*" matches any path.
The path of an object is the concatenation of the hierarchy nodes names with the '|' character. For instance, "Sphere" is the path of the Sphere object immediately located in the root, while "Group|Cube" is the path of the Cube object located in the Group scene node.
- Open the RenderGraph node network and the Node List view.
- Drag and drop a single or multiple nodes from the Node List view in the node network.
- Go in the RenderGraph node network.
- Add the Path node (Ctrl+Space then type 'path').
- Select single or multiple nodes by typing the matching pattern in the Path text box.
- Select the objects from the Viewport, Node List or Render View.
- Click the RenderGraph View to highlight it.
- Press P to drop the corresponding Path nodes.
Patterns are either Lua patterns or Posix regex. Lua patterns are usually simpler, while Posix are more powerful. Here are some examples of classical patterns:
- concrete matches any path containing 'concrete', for instance 'root|building|concrete_group|shape' or 'root|building|concrete'
- ^root matches any path starting by 'root', for instance 'root|building|concrete_group|shape' or 'root1|shape12'
- window$ matches any path ending by 'window', for instance 'root|glass|obj_window' or 'root1|floor|window', but not 'geo|obj_window_A'
- . represents all charaters
- %a represents all letters, %u represents all uppercase letters and %l represents all lowercase letters
- %d represents all decimal digits, from 0 to 9
- Any character (or character class) followed by * matches any number of this character (0 included), for instance %u* matches any sequence of uppercase characters (an empty sequence is accepted)
- Any character (or character class) followed by + matches one or more, for instance %d+ matches any sequence of at least one digit
- window%d* matches 'root|floor|window12' or 'root|floor|window_12' (because * can match 0 occurence)
- window%d+ matches 'root|floor|window12' but doesn't match 'root|floor|window_12'
- .+ represents all strings with at least one character. This is the pattern used in the Path node of a new RenderGraph for selecting all scene graph nodes.